<template>
  <div class="questions-check" @mouseenter="handleEnter">
    <el-radio-group class="from-wrap" v-model="from.chkState">
      <el-radio :label="1">通过</el-radio>
      <el-radio :label="2">拒绝</el-radio>
    </el-radio-group>
    <el-input
      class="textarea-wrap"
      type="textarea"
      placeholder="请输入审核意见"
      v-model.trim="from.chkRemarks"
    ></el-input>
    <div class="dialog-footer">
      <el-button @click="$emit('close')">取 消</el-button>
      <el-button type="primary" @click="$emit('check',from)">确 定</el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'QuestionsCheck',
  data() {
    return {
      from: {
        chkState: 1,
        chkRemarks: ''
      }
    }
  },
  methods: {
    handleEnter() {
      console.log(11111)
      if (this.from.chkRemarks.length > 0) return false
      this.$message.warning('请输入审核意见')
    }
  }
}
</script>

<style scoped>
.from-wrap {
  margin-top: 5px;
}
.textarea-wrap {
  margin-top: 25px;
  margin-bottom: 60px;
}
.dialog-footer {
  text-align: right;
}
</style>
